
import java.util.*;
import java.io.*;


public class StoreUniqueData{
	Scanner sc = new Scanner(System.in);
	HashMap<String, Integer> hm = new HashMap<String, Integer>();
	public static void main(String args[]) throws IOException{
		StoreUniqueData sud = new StoreUniqueData();
		sud.dataEntry();	
		sud.display();
	}
	
	public void dataEntry() throws IOException{
	char ch = 'y';
		while(ch=='y' || ch=='Y'){
			System.out.println("Enter name and integer");
			String n = sc.next();
			int i = sc.nextInt();
					hm.put(n,i);
				    System.out.println("Record added successfully ");
				   System.out.print("Do you want to add another record(Y/N)? : ");
				   ch=(char)System.in.read();
				   if(ch=='n'|| ch== 'N'){
                    System.out.println("No more record can be added");ch='n';
			   }
		}//while		
	}
	
	public void diplay(){
		
		Map.Entry<S
		for(Map.Entry<String,String> entry : entrySet){
			System.out.print( entry.getKey() + " " + entry.getValue() + " ");// Output(order) : 1-1,2-5,3-3,4-4
			System.out.println();
		} 
	}
		
}
